1. Field of the Invention
The present invention relates to a structural graph display. system, and more particularly, to a structural graph display system which utilizes index tables to reduce memory space needed for storing graphic information.
2. Description of Prior Art
High quality Chinese character generators commonly use a character generation technique which generates a character by generating all the strokes of the character one by one. Such character generation technique treats a Chinese character as a structural graph which comprises at least one stroke as its sub-graph. Each character may contain many strokes, depending on the complexity of each character. And each stroke of a Chinese character is represented by the contour of the stroke which is generated by a stroke generation program of the stroke.
When drawing a stroke in a rectangular area such as a 256 by 256 bit map to form a character, several stroke parameters must be provided: a stroke ID (identification), a predetermined number of control points which are represented as (x,y) coordinates within the rectangular area, and a predetermined number of stroke widths which are the widths of several predetermined locations of the stroke contour. Stroke ID is used for initiating a specific stroke program which will draw the stroke within the rectangular area according to the provided control points and width(s). A stroke program is written in a graphic description language. When all the strokes of a character are drawn into the rectangular area one by one in a predetermined sequence, the character is formed.
The total number of stroke types, which is represented as the. stroke IDs, for generating all the Chinese characters may around 70 in some commercial products which is not big when comparing with the number of Chinese characters provided by a Chinese character generator. A commercially available Chinese character generator may provide up to 14,000 Chinese characters. The number of stroke IDs may be changed by the manufacturer of each Chinese character generator, depending on how they classify all the strokes of Chinese characters. For each stroke ID, a correspondent stroke program is provided for generating the specific stroke according to the predetermined numbers of control points and stroke widths. The locations of the control points and the values of the stroke widths of a specific stroke may vary depending on the location of the stroke within a character and also depending on the artistic look of the character so that the length, thickness, and angle of the stroke may look differently. Different character fonts usually have quite different stroke contours. However, the number of control points and widths of a specific stroke can not be changed or else it couldn't be generated by the correspondent stroke program.
Please refer to FIG. 1. FIG. 1 shows a prior art stroke table 10. Stroke table 10 contains a stroke ID 14 for each stroke and a stoke program 12 for drawing each stoke in a rectangular area. When drawing a stroke, the stroke program 12 of the stroke will be initiated according to the stroke ID 14.
Please refer to FIG. 2 and FIG. 3. FIG. 2 shows the contour of a stroke 20 with its control points (X1, Y1) and (X2, Y2), and stroke width W1. FIG. 3 shows a stroke array 30 of the stroke 20 which comprises a stroke ID (ID2), the control points' coordinates X1, Y1, X2, and Y2 and stroke width W1. The number of control points and stroke width(s) contained in a stroke array may vary depending on the type of stroke ID. Certain stroke ID may contain up to five control points and three or four stroke widths.
Please refer to FIG. 4 and 5. FIG. 4 shows a character 48 which contains three strokes 40, 42 and 44. FIG. 5 shows a character array 50 of the character 48 which comprises three stroke arrays 52, 54 and 56 corresponding to the three strokes 40, 42 and 44, separately. The three stroke arrays 52, 54 and 56 are arranged in the character array 50 according to a predetermined drawing sequence which is similar to the hand-writing sequence of the character 48.
Please refer to FIG. 6. FIG. 6 shows a prior art character description file 60 which contains all the character arrays for all the characters provided by a prior art character generator. The character description file 60 comprises an address table 62 and a character array 64 for each character. The address table 62 contains a word ID (WID) for each character and the address of the corresponding character array 64. The data format of the character array 64 is the same as the character array 50 shown in FIG. 5 which comprises a sequence of stroke arrays of the correspondent character. When drawing a character by using a prior art character generator, it will first locate the character array 64 of the character by using the address table 62, and then draw all the strokes of the character one by one by using the located character array 64 and the stroke programs 12 stored in the stroke table 10 shown in FIG. 1 and within a rectangular area.
The above mentioned prior art character description file 60 has one problem: it requires a lot of memory space to store it. Take the character array 50 shown in FIG. 5 as an example, each stroke ID takes eight bits, and each X or Y coordinate or stroke width also takes eight bits. Totally it requires 48 bits for a very simple stroke. The number of Chinese characters in a commercially available Chinese character generator is approximately around 14,000. And a lot of characters contains eight or more strokes. A typical character description file requires about 1.5 MB (mega-byte) memory space. Such memory requirement is not a big problem when stored in a hard disk of a personal computer, but for those small electronic systems such as pager, hand-held calculator or personal organizer, etc., such memory requirement is a big problem especially multiple character fonts are required.
Most of these small electronic systems use ROM (read only memory) for storing the character description files. One character description file is needed for one character font. And vendors of small electronic systems usually prefer to put three or four different character fonts in a system so that the characters displayed in such a system may have a lot of variations. Total memory space for four character fonts may take more than 6 MB. It is very difficult for small electronic systems to provide such memory space.